package cn.lls.entity.company;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;
import java.io.Serializable;
import java.sql.Timestamp;

/**
 * <p>
 * 
 * </p>
 *
 * @author 划水艺术家
 * @since 2022-11-15
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("lls_department")
@ApiModel("公司部门信息实体类")
public class DepartmentEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 部门的Id，主键，自增
     */
    @TableId(value = "department_id", type = IdType.AUTO)
    @ApiModelProperty("部门的Id，主键，自增")
    private Long departmentId;

    /**
     * 公司的Id，外键
     */
    @ApiModelProperty("公司的Id，外键")
    @NotNull(message = "必须指定公司Id")
    private Long companyId;

    /**
     * 部门名
     */
    @ApiModelProperty("部门名")
    @NotEmpty(message = "必须指定部门名")
    private String departmentName;

    /**
     * 部门注册时间
     */
    @TableField(fill = FieldFill.INSERT)
    private Timestamp createTime;

    /**
     * 部门信息修改时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Timestamp updateTime;

    /**
     * 逻辑删除 1删除 0未删除
     */
    @TableLogic
    @Null(message = "无需添加逻辑字段")
    private Integer isDeleted;


}
